﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


public enum Gender
{
    Male,
    Female
}

public class Student
{

    private int age;
    private Gender gender;
    private string name;
    private int classNumber;

    public int Age
    {
        get { return age; }
        set 
        {
            if (value < 7 || value > 18)
                throw new IllegalArgumenException("age must be in [7 - 18]");
            age = value; 
        }
    }
    public Gender Gender
    {
        get { return gender; }
        set { gender = value; }
    }
    public string Name
    {
        get { return name; }
        set { name = value; }
    }
    public int ClassNumber
    {
        get { return classNumber; }
        set { classNumber = value; }
    }

    public Student(int age, Gender g, string name, int classNum)
    {
        if (age < 7 || age > 18)
        {
            throw new IllegalArgumenException("Age must be in range [7-18] !");
        }
        else 
        {
            this.Age = age;
        }

        int nameLength = name.Length;
        if (nameLength < 10 || nameLength > 50)
        {
            throw new IllegalArgumenException("Length of name must be in range [10 - 50] !");
        }
        else 
        {
            this.Name = name;
        }

        if (classNum < 1 || classNum > 11)
        {
            throw new IllegalArgumenException("ClassNum must be in range [1- 11]");
        }
        else
        {
            this.ClassNumber = classNum;
        }
    }

   


}

